function [ ] = recalc_params()

%
% led filter - both a500 and 1200
%

[~, ~, C2a, R2a, C3a ,R3a] = get_amiga_filter_params('a500');
[~, ~, C2b, R2b, C3b ,R3b] = get_amiga_filter_params('a1200');

assert(R2a == R2b);
assert(R3a == R3b);
assert(C2a == C2b);
assert(C3a == C3b);

R2org = R2a;
R3org = R3a;
C2org = C2a;
C3org = C3a;

f2org = 1 / (2 * pi * sqrt(R2org * R3org * C2org * C3org));
f2python = 3275.0;

% taken from python
%ts2 = tf([0 0 1], [2.3616482785e-09 7.44942251189e-05 1]); 
b2 = 2.3616482785e-09;
b1 = 7.44942251189e-05;
% compare to transfer function we get:
% R2*R3*C3*C2 = b2; % note b2 = w^2 % w = 1 / (2*pi*f)
% C3*(R2+R3) = b1;

% we alter capacitors, one way another we can do the same with another
% elements. It's doesn't matter as long as our transfer function is the
% same.
C3python = b1 / (R2org + R3org);
C2python = b2 / (C3python * R2org * R3org);
R2python = R2org;
R3python = R3org;

%
% check led filter
%

[~, ~, C2a, R2a, C3a ,R3a] = get_amiga_filter_params('a500 winuae');
[~, ~, C2b, R2b, C3b ,R3b] = get_amiga_filter_params('a1200 winuae');

assert(R2a == R2b);
assert(R3a == R3b);
assert(C2a == C2b);
assert(C3a == C3b);

f2winuae = 1 / (2 * pi * sqrt(R2a * R3a * C2a * C3a));

assert(f2python - f2winuae < 0.01);

assert(R2a == R2python);
assert(R3a == R3python);
assert(C2a - C2python < 1e-15);
assert(C3a - C3python < 1e-15);

%
% a500 low pass filter
%

[C1org, R1org, ~, ~, ~, ~] = get_amiga_filter_params('a500');

f1org =  1 / (2 * pi * R1org * C1org);
f1python = 4900;

C1python = 1 / (2 * pi * f1python * R1org);
R1python = 1 / (2 * pi * f1python * C1python);

%
% check a500 low pass filter
%

[C1winuae, R1winuae, ~, ~, ~, ~] = get_amiga_filter_params('a500 winuae');

f1winuae =  1 / (2 * pi * R1winuae * C1winuae);

assert(f1winuae == f1python);

assert(R1winuae == R1python);
assert(C1winuae == C1python);

%
% a1200 low pass filter
%

[C1org, R1org, ~, ~, ~, ~] = get_amiga_filter_params('a1200');

f1org =  1 / (2 * pi * R1org * C1org);
f1python = 32000;

C1python = 1 / (2 * pi * f1python * R1org);
R1python = 1 / (2 * pi * f1python * C1python);

%
% check a1200 low pass filter
%

[C1winuae, R1winuae, ~, ~, ~, ~] = get_amiga_filter_params('a1200 winuae');

f1winuae =  1 / (2 * pi * R1winuae * C1winuae);

assert(f1winuae == f1python);

assert(R1winuae == R1python);
assert(C1winuae == C1python);

end